package domain.entities;

import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Budget entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "global_commitment", catalog = "bms")
public class GlobalCommitment implements java.io.Serializable {

	// Fields

	private Integer id;
	private Protocolo protocolo;
    private Integer tpeEnrolled;
    private Integer tpeRandomized;
    private Date plannedFpfv;
    private Date plannedLpfv;
    private Date plannedLplv;

	// Constructors

	/** default constructor */
	public GlobalCommitment() {
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

    @OneToOne(cascade=CascadeType.ALL)
    public Protocolo getProtocolo() {
        return protocolo;
    }

    public void setProtocolo(Protocolo protocolo) {
        this.protocolo = protocolo;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "plannedFpfv", length = 10)
    public Date getPlannedFpfv() {
        return this.plannedFpfv;
    }


    public void setPlannedFpfv(Date plannedFpfv) {
        this.plannedFpfv = plannedFpfv;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "plannedLpfv", length = 10)
    public Date getPlannedLpfv() {
        return this.plannedLpfv;
    }


    public void setPlannedLpfv(Date plannedLpfv) {
        this.plannedLpfv = plannedLpfv;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "plannedLplv", length = 10)
    public Date getPlannedLplv() {
        return this.plannedLplv;
    }

    public void setPlannedLplv(Date plannedLplv) {
        this.plannedLplv = plannedLplv;
    }

    @Column(name = "tpeEnrolled")
    public Integer getTpeEnrolled() {
        return tpeEnrolled;
    }

    public void setTpeEnrolled(Integer tpeEnrolled) {
        this.tpeEnrolled = tpeEnrolled;
    }

    @Column(name = "tpeRandomized")
    public Integer getTpeRandomized() {
        return tpeRandomized;
    }

    public void setTpeRandomized(Integer tpeRandomized) {
        this.tpeRandomized = tpeRandomized;
    }

}